﻿-- ================================================
-- Remarks: 
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'Ivy_SocietyEmployeeRegister_GetByEmployeeCode')
	BEGIN
		DROP  Procedure  Ivy_SocietyEmployeeRegister_GetByEmployeeCode
	END

GO

CREATE PROCEDURE [Ivy_SocietyEmployeeRegister_GetByEmployeeCode]
-- =============================================
-- Author:		<Sagar>
-- Create date: <07/11/2014>
-- Description:	<Ivy_SocietyEmployeeRegister_GetByEmployeeCode>
-- =============================================
-- Add the parameters for the stored procedure here
	(
				@EmployeeCode varchar(50)
	)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT OFF;

	SELECT     
			[EmployeeUserKey], 
			[EmployeeSocietyKey],
			[EmployeeCode], 
			[UserLoginID], 
			[SocietyName], 
			[EmployeeJoiningDate],
			[EmployeeReleaseDate],

			[Sys_DateOfCreation], 
			[Sys_DateOfModification], 
			[Sys_CreatedByID], 
			[Sys_ModifiedByID],
			[Sys_DeleteType], 
			[Sys_IsDeleted], 
			[Sys_OrganizationID], 
			[Sys_InitialPrimaryKeys], 
			[Sys_WorkstationName]

	FROM	[SocietyEmployeeRegister]

	WHERE     
		(
			[EmployeeCode] = @EmployeeCode
		);
END
GO
